/*---------begin changed by wangwei--------------*/
//the whole file is changed, the original file is named as pi_det_old.c
/*---------end changed---------------------------*/

/* $Header: pi_det.c,v 2.3 03/06/04 11:31:01 przybyls Exp $ */

/***********************************************************************/
/*                                                                     */
/*                  Copyright Hewlett-Packard Co. 1991                 */
/*                                                                     */
/***********************************************************************/

/***********************************************************************/
/* MODULE NAME:                                                        */
/* ============                                                        */
/*                                                                     */
/* Author:                                                             */
/*                                                                     */
/* MODULE PURPOSE:                                                     */
/*                                                                     */
/*                                                                     */
/*                                                                     */
/*                                                                     */
/***********************************************************************/


/*****************************/
/*   GLOBAL INCLUDE FILES    */
/*****************************/

#include <typedefs.h>
#include <error.h>
#include <p_wkfile.h>
#include <wkfile.h>
#include <i_op.h>
#include <p_status.h>
#include <pcb_defs.h>
#include <list_mgmt.h>
#include <detector.h>
#include <math.h>
#include <exception.h>   /* to use Set/Clear Exception */
#include <err_handler.h> /* to use Set/Clear Exception */
#include <glp.h>
#include <clock_ui.h>
#include <keyboard.h>
#include <iomap.h>

/*****************************/
/*   LOCAL INCLUDE FILES     */
/*****************************/

#include "proto.h"

/*****************************/
/*   GLOBAL VARIABLES        */
/*****************************/


/*****************************/
/*   EXTERNAL VARIABLES      */
/*****************************/


/*****************************/
/*   LOCAL DEFINES           */
/*****************************/

/**begin_proto**/

#define  FID_FUEL_GAS 1
#define  FID_AIR_GAS  2
#define  FID_MUG_GAS  3

#define  FPD_FUEL_GAS 1
#define  FPD_AIR_GAS  2
#define  FPD_MUG_GAS  3

#define  NPD_FUEL_GAS 1
#define  NPD_AIR_GAS  2
#define  NPD_MUG_GAS  3

#define  TCD_REF_GAS  2
#define  TCD_MUG_GAS  3

#define  ECD_ANODE_PURGE_GAS 2
#define  ECD_MUG_GAS  3

#define  CalPres Flow

/**end_proto**/

/*****************************/
/*   STATIC VARIABLES        */
/*****************************/


/*****************************/
/*   IMPLEMENT SECTION       */
/*****************************/
/***********************************************************************/
/* FUNCTION:                                                           */
/* ========                                                            */
/*                                                                     */
/* PURPOSE:                                                            */
/*                                                                     */
/* RETURNED VALUE:                                                     */
/*                                                                     */
/* GLOBALS USED:                                                       */
/*                                                                     */
/***********************************************************************/
/**begin_proto**/

BIT8 EpcDetector( pDETECTOR_STATUS  status )

/**end_proto**/
{
    if ( !status->Config->Functional ) return FALSE; /* dead det */

    return  ( (U_INT16)status->Config->Type & EPC_DET_BIT ) != 0;
}
